package com.shaozi.nc.mq.translation;

import com.shaozi.data.mq.business.base.MqConsts.UserType;
import com.shaozi.data.mq.business.base.SourceTypeConsts.OA.Report;
import com.shaozi.data.mq.business.bean.MQExchangeData;
import com.shaozi.data.mq.business.bean.MQExchangeRuleBean;
import com.shaozi.data.mq.business.bean.MQPushItem;

public class ReportPushTranslation extends BaseOaPushTranslation {

	public ReportPushTranslation() {

	}

	protected int[] onUserType(MQExchangeData data) {
		MQExchangeRuleBean rule = (MQExchangeRuleBean) data.getRule();
		MQPushItem pushItem = rule.getPush();

		switch (pushItem.getSourceType()) {
		case Report.Rule_Update:
			int[] ret = { UserType.Add, UserType.Delete, UserType.Undefine };
			return ret;

		default:
			int[] defaultRet = { UserType.Undefine };
			return defaultRet;
		}
	}
}
